package com.ytjj.qmyx.supplychain.mapper;

import com.ytjj.qmyx.supplychain.common.model.ReturnOrderStatisticsResponse;
import com.ytjj.qmyx.supplychain.mapper.entity.ReturnGoodStatisticsDetail;
import com.ytjj.qmyx.supplychain.mapper.entity.ReturnGoodStatisticsSearch;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface ReturnGoodsStaticsMapper extends Mapper<ReturnGoodStatisticsDetail> {

    int batchInsert(@Param("markId") String markId, @Param("shopId") String shopId, @Param("entity") List<ReturnOrderStatisticsResponse> entity);

    /**
     * 标记执行计划的完成状态
     * @param markId
     * @param finishStatus 完成状态 0-未完成 1-已完成 2-已失败
     */
    int markFinished(String markId,Integer finishStatus);

    /**
     * 插入数据
     */
    int insertSearch(ReturnGoodStatisticsSearch returnGoodStatisticsSearch);

    /**
     * 获取单品退款统计详情
     */
    List<ReturnGoodStatisticsDetail> getProductRefundStatisticsDetail(String markId);

    /**
     * 获取单品退款统计详情-汇总
     */
    ReturnGoodStatisticsDetail getProductRefundStatisticsSummary(String markId);

    /**
     * 获取单品售后统计历史
     */
    List<ReturnGoodStatisticsSearch> getHistoryProductRefund();



}
